const initialState = {
  detailsItem: {}
}

const reducer = (state = initialState, { type, payload }: any): any => {
  const newState = JSON.parse(JSON.stringify(state))
  switch (type) {
    case 'DETAILSITEM':
      newState.detailsItem = payload
      return newState

    default:
      return newState
  }
}
export default reducer
